package com.flot.yazb.home.moudle;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.WindowManager;
import android.widget.Button;

import com.flot.yazb.R;
import com.flot.yazb.base.BActivity;
import com.flot.yazb.widget.utils.StatusBarUtils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;


public class EndZhiBoActivity extends BActivity {
    @BindView(R.id.btn_back)
    Button btnBack;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_zhibo_end);
        ButterKnife.bind(this);
    }

    @Override
    protected void onResume() {
        super.onResume();
        StatusBarUtils.setStatusBarTranslucent(this, true, R.color.theme_color, true);
        setScreenFullToggle();
    }


    public void setScreenFullToggle() {

        int flag = activity.getWindow().getAttributes().flags;
        if ((flag & WindowManager.LayoutParams.FLAG_FULLSCREEN)
                == WindowManager.LayoutParams.FLAG_FULLSCREEN) {
            this.getWindow().clearFlags(
                    WindowManager.LayoutParams.FLAG_FULLSCREEN);
        } else {
            this.getWindow().setFlags(
                    WindowManager.LayoutParams.FLAG_FULLSCREEN,
                    WindowManager.LayoutParams.FLAG_FULLSCREEN);
        }
    }

    @OnClick(R.id.btn_back)
    public void onClick() {
        finish();
    }
}
